function url(p) {
  // return `http://yapi.dev.crc.com.cn/mock/98/errorcode/${p}`;
  return `${window.RPConfig.errorCenter}/errorcode/${p}`;
}

export const getMessageList = param => {
  return $http.post(url("page"), param).then(res => res);
};

export const saveErrorData = param => $http.post(url(param.id ? "update" : "add"), param);

export const delError = ids => $http.post(url("delete"), ids);
// 获取错误码详细信息
export const getErrorById = id => $http.get(url(`get?id=${id}`));
